package zero.tech.games.mj.event;

import zero.tech.core.event.EventCallbackListener;
import zero.tech.core.event.EventType;
import zero.tech.games.logic.common.Room;
import zero.tech.games.logic.data.LogicEventType;
import zero.tech.games.mj.util.RoomUtil;
import zero.tech.wsnet.controller.LogicController;

/**
 * 玩家准备检查钱
 * @author ludry
 *
 */
public class RoomReadyCheckMoney implements EventCallbackListener<Boolean>{

	@Override
	public EventType netEventType() {
		return LogicEventType.READY_CHECK_MONEY;
	}

	@Override
	public Boolean notifyEvent(Object... objs) {
		Room room = (Room) objs[0];
		LogicController logicController = (LogicController) objs[1];
		return RoomUtil.checkMoneyEnoughNextRound(room,logicController);
	}

	@Override
	public boolean asynchronous() {
		return false;
	}

}
